package br.com.velp.sudecap.serviceimpl;

import br.com.velp.sudecap.comum.SpringConstants;
import br.com.velp.sudecap.dao.LocalAcervoDAO;
import br.com.velp.sudecap.entidade.LocalAcervo;
import br.com.velp.sudecap.service.LocalAcervoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author Eduardo
 */
@Service("localAcervoService")
@Transactional(readOnly = true)
@Lazy(SpringConstants.LAZY_BEANS)
public class LocalAcervoServiceImpl implements LocalAcervoService {
    
    @Autowired
    private LocalAcervoDAO localAcervoDAO;

    @Override
    @Transactional(readOnly = false)
    public Long salvar(LocalAcervo value) throws Exception {
        return this.localAcervoDAO.salvar(value);
    }

    @Override
    @Transactional(readOnly = false)
    public void atualizar(LocalAcervo value) throws Exception {
        this.localAcervoDAO.atualizar(value);
    }

    @Override
    public LocalAcervo obterPorId(Long id) {
        return this.localAcervoDAO.obterPorId(id);
    }

    @Override
    @Transactional(readOnly = false)
    public void excluir(LocalAcervo value) throws Exception {
        this.localAcervoDAO.excluir(value);
    }
    
}
